Skip to main content

Selfie Validation

Description

The Selfie Validation module verifies if a user's selfie has been captured by a live individual at the time of the verification indicating no fraudulent impersonation attempt. It also supports additional configurations to suit your business requirements.

Steps Involved

The module implements the following steps to complete the verification process:

  1. Prompts the user to capture their selfie and recommends best practices for the process.
  2. Guides the user with real-time instructions on the live preview screen while capturing the selfie. For example,
    • "Place your face inside the circle."
    • "Please move away from the camera."
    • "Stay still and capture."
  3. Performs additional quality and liveness checks.
Did you know?

In a fraudulent "photo-on-photo" scenario, a fraudster attempts to use an existing photograph of a different individual to deceive the verification system.

Inputs

The module initiates a live selfie capture which serves as the input for the validation process.

Module Configurations

The following is a list of toggle configurations supported by the module.

FeatureDescriptionDefault Value
Show Capture InstructionsWhen the toggle is set to active, it enables a screen with instructions before the live selfie capture screen. You can configure the instructions to suit your verification process requirements.Yes
Disable LivenessWhen the toggle is set to active, it disables the liveness check for the module.No

Configuring Quality Checks

In addition to liveness check, the selfie validation module can also execute additional quality checks on the image. Click the link to learn more about the additional selfie checks. If configured, the details relevant to these quality checks are displayed under the qualityChecks object in the response.

Module Outputs

The following information is returned in the Results API

Success Scenario

{
"module": "Selfie Validation",
"moduleId": "selfie_validation",
"selfieImageUrl": "<URL>",
"attempts": "2",
"apiResponse": {
"status": "success",
"statusCode": 200,
"metadata": {
"requestId": "1659158312255-6b19f301-0747-4a89-b539-6296e0d1bfa8",
"transactionId": "asdfasdfa"
},
"result": {
"details": [
{
"liveFace": {
"value": "yes"
},
"qualityChecks": {
"eyesClosed": {
"value": "no",
"confidence": "high"
},
"occlusion": {
"value": "yes",
"confidence": "high"
},
"multipleFaces": {
"value": "no",
"confidence": "high"
}
}
}
],
"summary": {
"action": "pass",
"details": []
}
}
},
"previousAttempts": []
}

Response Details

ObjectFieldDescription
module-The name of the module is "Selfie Validation."
moduleId-The unique identifier for the "Selfie Validation" module is "selfie_validation."
selfieImageUrl-The signed URL of the selfie image captured by user. This URL remains valid for a duration of 15 minutes.
attempts-The number of attempts made by user to capture the selfie.
previousAttempts-If there were multiple attempts made by the user, this array will contain the older attempts, sorted from latest to oldest
apiResponse-The response for the "Selfie Validation" module. If there were multiple attempts made by the user, this key will contain the latest attempt.
status-The status of the response is "success."
statusCode-The code representing the response status.
metadata-The metadata related to the response.
requestId-A unique identifier to track the request
transactionId-The transaction ID used in the API request
result-The result of the response.
details-Details related to the validation process, including liveness and quality checks.
liveFacevalueIf the value is "yes," the liveness check is successful.
qualityChecks-Quality checks performed on the selfie.
eyesClosedvalueIf the value is "no," the eyes are not closed with high confidence.
occlusionvalueIf the value is "yes" face is partially or fully occluded by objects, hands, masks, accessories (like sunglasses, hats), or other obstructions that prevent clear visibility of facial features
multipleFacesvalueIf the value is "no," multiple faces are not detected with high confidence.
summaryactionIt displays the recommended action, which is "pass." Details are empty in this case.
previousAttempts-No previous attempts were made in this case.

Understanding the apiResponse Object

KeyDescriptionValues Possible
liveFace.valueResult of the liveness check"yes" or "no"
liveFace.confidenceHow confident is the AI model about it's liveness prediction"high" or "low"
qualityChecksResults of quality checks performed on the selfie
More details in the next section
JSON
summaryA final summary based on the checks performed in the module
What is summary?
Default Summary Config
JSON

Failure Scenarios

Below is the response in Results API for a typical error scenario.

{
"module": "Selfie Validation",
"moduleId": "selfie_validation",
"selfieImageUrl": "<URL>",
"apiResponse": {
"status": "failure",
"statusCode": 422,
"metadata": {
"requestId": "1659160534742-e604164f-a4a4-4e6f-9292-3b8d99e97f45",
"transactionId": "123456"
},
"result": {
"error": "No face detected",
"summary": {
"action": "fail",
"details": [
{
"code": "121",
"message": "Face Not detected"
}
]
}
}
},
"previousAttempts": []
}

List of Errors Possible

Below are all the errors possible in this module. The 'statusCode' is present under apiResponse

StatusCodeSummaryDescription
422Face not detectedWhen face is not detected in selfie captured
429Rate limit errorWhen the number of requests per minute has crossed the set limit for your credentials
5xxServer ErrorPlease reachout to HyperVerge

Default Summary Configuration

Scenario'Action' in summary
Face not detectedfail after 2 retakes
Non Live selfiemanualReview
Quality check failedmanualReview after 2 retakes
None of the abovepass

Reading Results for Selfie Validation

We recommend using the liveFace parameter in the response to decide the result.

  • liveFace.value = “yes” , when the face in the image taken is live
  • liveFace.value = “no” , when face in the image taken is not live
  • action parameter in the response can be used to decide whether the image sent requires manual review or not (optional)

How to assess the Liveness, based on the response returned by the API:

Approved

When,

  • statusCode = 200,
  • liveFace.value = "yes" ,
  • and action = "pass"

Rejected

When,

  • statusCode = 200,
  • liveFace.value = "no",
  • action = "fail",
  • and all other status codes

Manual Review

When,

  • statusCode = 200,
  • liveFace.value = "yes"/"no",
  • action = "manualReview"
  • Retries can be enabled to avoid manual review. Maximum of 3 retries is recommended.
Was this helpful?
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: